package JDK11对于String处理方法的增强;

public class Test {
    public static void main(String[] args) {
        //判断字符串是否为空白
        System.out.println("  ".isBlank());
        System.out.println("  ".isEmpty());
        //去除首尾空白
        System.out.println("  itheima    ".strip());
        System.out.println("     itheima    ".trim());

        System.out.println("     itheima    ".stripTrailing());
        System.out.println("     itheima    ".stripLeading());

        //复制字符串
        System.out.println("itheima".repeat(3));
        //统计行数
        System.out.println("a\ndf\nfdsf".lines().count());
    }
}
